/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package business;

/**
 *
 * @author Eduardo
 */
public class IndexItemSimulitude implements Comparable {

    private IndexItem indexItem;
    private Double similitude;

    public IndexItemSimulitude(IndexItem i, Double s)
    {
        this.indexItem = i;
        this.similitude = s;
    }

    public int compareTo(Object o)
    {
        IndexItemSimulitude is = (IndexItemSimulitude)o;

        if(this.similitude > is.similitude)
            return 1;
        else if (this.similitude == is.similitude)
            return 0;        

        return -1;
    }


    

    public IndexItem getIndexItem() {
        return indexItem;
    }

    public void setIndexItem(IndexItem indexItem) {
        this.indexItem = indexItem;
    }

    public Double getSimilitude() {
        return similitude;
    }

    public void setSimilitude(Double similitude) {
        this.similitude = similitude;
    }

}
